@import '../global';
@import 'compass/css3/box-sizing';
@import 'blueprint/typography';

$experimental-support-for-mozilla: false;
$experimental-support-for-opera: false;
$experimental-support-for-microsoft: false;
$experimental-support-for-khtml: false;

html, body {
  font-family: "Helvetica Neue", HelveticaNeue, "Helvetica-Neue", Helvetica, "BBAlpha Sans", sans-serif;
  font-weight: normal;
  position: relative;
}

*, *:after, *:before {
  @include box-sizing(border-box);
  -webkit-user-select: none;
  -webkit-text-size-adjust: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/*.x-android {*/
  /*input[type=checkbox], input[type=radio] {*/
    /*-webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;*/
  /*}*/

  /*input, textarea {*/
    /*-webkit-tap-highlight-color: rgba(0, 0, 0, 1) !important;*/
  /*}*/
/*}*/

html, body, .x-body-stretcher {
 width: 100%;
 height: 100%;
}

.x-ios.x-tablet .x-landscape * {
  -webkit-text-stroke: 1px transparent;
}

/*
.x-ipad {
  .x-container, .x-panel, .x-toolbar, .x-mask {
    -webkit-transform: translate3d(0, 0, 0);
  }
}
*/

body {
  font-size: 104%;
}

body.x-ios {
  -webkit-backface-visibility: hidden;
}

body.x-android.x-phone {
  font-size: 116%;
}

body.x-ios.x-phone {
  font-size: 114%;
}

body.x-desktop {
  font-size: 114%;
}

input, textarea {
  -webkit-user-select: text;
}

.x-hidden-visibility {
    visibility: hidden !important;
}

.x-hidden-display {
    display: none !important;
}

.x-hidden-offsets {
  position: absolute !important;
  left: -10000em;
  top: -10000em;
  visibility: hidden;
}

.x-fullscreen {
  position: absolute !important;
  top: 0px;
  left: 0px;
}

.x-desktop .x-body-stretcher {
  margin-bottom: 0px;
}

.x-scroller-parent {
    overflow: hidden !important;
}

.x-scroller-parent, .x-scroller {
  position: relative;
}

.x-ios .x-scroller, .x-ios .x-scroller > * {
    -webkit-transform: translate3d(0, 0, 0);
}

.x-draggable {
  z-index: 1;
}

.x-scrollbar {
  position: absolute;
  z-index: 10;
  @if $include-border-radius {
  -webkit-transition-property: opacity;
  -webkit-transition-duration: 250ms;
  -webkit-border-radius: 4px;
  }
  opacity: 0;
}

.x-android .x-scrollbar {
  -webkit-transition-property: none;
  -webkit-transition-duration: 0ms;
  -webkit-border-radius: 0px;
}

.x-scrollbar-dark {
  background-color: rgba(0, 0, 0, .6);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.x-scrollbar-light {
  background-color: rgba(255, 255, 255, .6);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.x-scrollbar-vertical {
  top: 0;
  right: 4px;
  width: 4px;
}

.x-scrollbar-horizontal {
  left: 0;
  bottom: 4px;
  height: 4px;
}

.x-mask {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 8000;
  @include display-box;
  @include box-align(center);
  @include box-pack(center);
  background: rgba(0,0,0,.3) center center no-repeat;

  &.x-mask-gray {
    background-color: rgba(0, 0, 0, 0.5);
  }

  .x-mask-loading {
    @include display-box;
    @include box-orient(vertical);
    @include box-align(center);
    @include box-pack(center);
    @if $include-border-radius { @include border-radius(.5em); }
    color: #fff;
    text-align: center;
    padding: .4em;
    font-weight: bold;
    display: block;
    width: 8.5em;
    height: 8.5em;
    background: rgba(0, 0, 0, .25);
  }

  .x-loading-spinner {
    margin: 1em auto .2em;
  }

  .x-loading-msg {
    font-size: .95em;
    @include bevel-text;
  }
}

.x-floating {
  position: absolute !important;
  z-index: 10000 !important;
  top: 0;
  left: 0;
}

.x-dragging {
  opacity: 0.7;
}

.x-panel-list {
  background-color: saturate(lighten($base-color, 50%), 15%);
}

@if $include-html-style {
  .x-html {
    -webkit-user-select: auto;
    -webkit-touch-callout: inherit;

    @include blueprint-typography;
    line-height: 1.5;
    color: #333;
    font-size: .8em;
    padding: 1.2em;

    ul li {
      list-style-type: circle;
    }
    ol li {
      list-style-type: decimal;
    }
  }
}

.x-video {
  background-color: #000;
}

.x-sortable .x-dragging {
  opacity: 1;
  z-index: 5;
}

.x-fullscreen {
  background: $page-bg-color;
}
